SetVirtualTimePolicyRequest

data class SetVirtualTimePolicyRequest(policy: VirtualTimePolicy, budget: Double?, maxVirtualTimeTaskStarvationCount: Int?, waitForNavigation: Boolean?, initialVirtualTime: TimeSinceEpoch?)

Represents request frame that can be used with Emulation#setVirtualTimePolicy operation call.

Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.

See also

Constructors

SetVirtualTimePolicyRequest
Link copied to clipboard
fun SetVirtualTimePolicyRequest(policy: VirtualTimePolicy, budget: Double? = null, maxVirtualTimeTaskStarvationCount: Int? = null, waitForNavigation: Boolean? = null, initialVirtualTime: TimeSinceEpoch? = null)

Properties

budget
Link copied to clipboard
val budget: Double? = null
If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
initialVirtualTime
Link copied to clipboard
val initialVirtualTime: TimeSinceEpoch? = null
If set, base::Time::Now will be overriden to initially return this value.
maxVirtualTimeTaskStarvationCount
Link copied to clipboard
val maxVirtualTimeTaskStarvationCount: Int? = null
If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
policy
Link copied to clipboard
val policy: VirtualTimePolicy
waitForNavigation
Link copied to clipboard
val waitForNavigation: Boolean? = null
If set the virtual time policy change should be deferred until any frame starts navigating.

Sources

jvm source
Link copied to clipboard